The problem of how to find a particular pattern in an image is a well-known problem with many known solutions, such as feature-based search methods. Typically, the pattern is assumed to have undergone one or more of a few basic transformations, such as being scaled, or being rotated. However, these known solutions often fail if the pattern has been deformed by being warped, pulled, bent, wrinkled, damaged, or otherwise fundamentally changed from the original un-deformed shape that the search process is adapted to find.
Nevertheless, even after transformation of the whole pattern, if the deformed pattern is divided into smaller sub-patterns, those sub-patterns are themselves fairly close in form to the corresponding parts of the original un-deformed pattern. For example, if the pattern is bent into a “V” or boomerang shape, then the two legs of the boomerang both represent good, easily-findable portions of the pattern. It's only the deformed pattern that is hard to find as an entirety. Therefore, searching for a deformed pattern in an image may be facilitated by dividing the deformed pattern into smaller sub-patterns. For many typical types of deformation encountered, most of those sub-patterns are probably findable by known feature-based search methods (because the sub-patterns are not themselves substantially distorted).
However, it is then necessary for a subsequent algorithm to combine the sub-pattern search results into a full match of the distorted whole pattern. Unfortunately, searching for a large number of sub-patterns in an image takes much longer than searching for a single whole pattern. Furthermore, sub-patterns are inherently simpler than the whole pattern, so they're more likely to be confused when they are used in searching the target image, potentially yielding many spurious matches in various locations of the target image.
It is sometimes useful to characterize the deformation of the deformed whole pattern after it has been found. However, even though a deformed whole pattern has been found, a characterization of the deformation may still not be known. The deformation of the whole pattern can be characterized after each of the sub-patterns have been located. In some cases, the deformation may be easily characterized, such as the deformation due to 3D perspective, or the deformation due to the whole pattern being wrapped around a cylinder, such as when a label is wrapped around a can. In other cases, the deformation may be more atypical, representing random wrinkles, folds, bends, dents, and so forth, and is consequently not characterized by a known or standard transformation. In either case, an automated method of characterizing deformation after finding a deformed pattern would be useful in some applications, e.g., inspecting printing on soda cans, inspecting labels on oddly shaped containers such as bags of sugar, or inspecting lot and date codes on medicine bottles. With a deformation transform that maps between the deformed pattern (e.g. the logo on a full bag of sugar or the date code on a curved bottle) and the original undeformed pattern (e.g., the logo as it would appear on a flat piece of paper), tasks using inspection tools suitable for undeformed patterns can be performed, such as inspection of logo print quality. This would be impossible without a characterization, and un-doing based on the characterization, of the deformation of the bag or bottle, because wrinkles or curvature would easily be misclassified as a print defects using inspection tools suitable for undeformed patterns, even though the print quality might otherwise be acceptable.